#-------------------------------------------------
#
# Project created by QtCreator 2018-02-10T15:20:35
#
#-------------------------------------------------
include(../spectrum.pri)

QT       += core gui quickwidgets
QT       += multimedia multimediawidgets
# webenginewidgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = spectrum
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


SOURCES += main.cpp\
        mainwindow/mainwindow.cpp \
    mainwindow/finddesktop.cpp \
    mainwindow/mousehook.cpp \
    mainwindow/mainwindowtest.cpp \
    mainwindow/filereader.cpp \
    spectrum/engine.cpp \
    spectrum/frequencyspectrum.cpp \
    spectrum/spectrograph.cpp \
    spectrum/spectrumanalyser.cpp \
    spectrum/tonegenerator.cpp \
    spectrum/wavfile.cpp \
    spectrum/utils.cpp

HEADERS  += mainwindow/mainwindow.h \
    mainwindow/finddesktop.h \
    mainwindow/mousehook.h \
    mainwindow/mainwindowtest.h \
    mainwindow/filereader.h \
    spectrum/engine.h \
    spectrum/frequencyspectrum.h \
    spectrum/spectrograph.h \
    spectrum/spectrum.h \
    spectrum/spectrumanalyser.h \
    spectrum/tonegenerator.h \
    spectrum/utils.h \
    spectrum/wavfile.h

FORMS    += mainwindow/mainwindow.ui \
    mainwindow/mainwindowtest.ui

RC_FILE = icon.rc

RESOURCES += \
    qml/qrc.qrc

fftreal_dir = ../3rdparty/fftreal

INCLUDEPATH += $${fftreal_dir}

# Dynamic linkage against FFTReal DLL
!contains(DEFINES, DISABLE_FFT) {
    macx {
        # Link to fftreal framework
        LIBS += -F$${fftreal_dir}
        LIBS += -framework fftreal
    } else {
        LIBS += -L..$${spectrum_build_dir}
        LIBS += -lfftreal
    }
}

DESTDIR = ..$${spectrum_build_dir}

linux-g++*: {
    # Provide relative path from application to fftreal library
    QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
}
